package com.moshme.project.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.moshme.common.annotation.Excel;
import com.moshme.common.core.domain.entity.SysUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 望夜
 * @date 2023/8/22---16:34
 * @SuppressWarnings({"all"})
 */
@Data
@Accessors(chain = true)
@TableName("project_step")
@ApiModel(description = "对接阶段")
public class ProjectStep implements Serializable {
    private static final long serialVersionUID=1L;

    /** 阶段ID */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("阶段id")
    private Long stepId;

    /** 阶段开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "阶段开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("阶段开始时间")
    private LocalDate stepStartDate;

    /** 阶段结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "阶段结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("阶段结束时间")
    private LocalDate stepEndDate;

    /** 项目ID */
    @ApiModelProperty("项目id")
    private Long projectId;

    @ApiModelProperty("提交时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime submitTime;

    /** 创建者 */
    @ApiModelProperty("提交者")
    private String submitBy;

    @ApiModelProperty("对接阶段执行天数")
    @TableField(exist = false)
    private Integer ImplDays;

    @ApiModelProperty("区间选择日期数组")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate[] dateArray;

    @ApiModelProperty("项目阶段")
    private Integer projectStep;

    @ApiModelProperty("阶段状态(0-未开始，1-进行中，2-已完结)")
    private Integer stepStatus;

    @ApiModelProperty("阶段负责人")
    @Excel(name = "阶段负责人")
    @NotNull(message = "阶段负责人不能为空")
    private Long stepLeader;

    /**
     * 子员工组
     */
    @ApiModelProperty("子员工组")
    @TableField(exist = false)
    private Long[] stepUserIds;


    @ApiModelProperty("当前点击阶段")
    @TableField(exist = false)
    private Integer clickStep;
}
